package org.cvcsc.weproject.controller.dto;

import org.cvcsc.weproject.domain.CourseSchedule;

import io.swagger.v3.oas.annotations.media.Schema;

public class ResponseDtoCourseSchedule {
    @Schema(description = "课程安排ID", example = "123")
    private Long id;
    @Schema(description = "班级ID", example = "456")
    private Long clazzId;
    @Schema(description = "班级名称", example = "计算机科学1班")
    private String clazzName;
    @Schema(description = "周数", example = "1")
    private int week;
    @Schema(description = "星期几", example = "2")
    private int day;
    @Schema(description = "课程名称", example = "Java编程")
    private String courseName;
    @Schema(description = "教师姓名", example = "张老师")
    private String teacherName;
    @Schema(description = "开始节次", example = "1")
    private int startPeriod;
    @Schema(description = "结束节次", example = "2")
    private int endPeriod;

    public ResponseDtoCourseSchedule() {
    }

    public ResponseDtoCourseSchedule(CourseSchedule courseSchedule) {
        this.id = courseSchedule.getId();
        this.clazzId = courseSchedule.getClazz().getId();
        this.clazzName = courseSchedule.getClazz().getName();
        this.week = courseSchedule.getCourseScheduleTime().getWeek();
        this.day = courseSchedule.getCourseScheduleTime().getDay();
        this.courseName = courseSchedule.getCourseName();
        this.startPeriod = courseSchedule.getCourseScheduleTime().getStartPeriod();
        this.endPeriod = courseSchedule.getCourseScheduleTime().getEndPeriod();
    }

    // Getters and Setters
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getClazzId() {
        return clazzId;
    }

    public void setClazzId(Long clazzId) {
        this.clazzId = clazzId;
    }

    public String getClazzName() {
        return clazzName;
    }

    public void setClazzName(String clazzName) {
        this.clazzName = clazzName;
    }

    public int getWeek() {
        return week;
    }

    public void setWeek(int week) {
        this.week = week;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getTeacherName() {
        return teacherName;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }

    public int getStartPeriod() {
        return startPeriod;
    }

    public void setStartPeriod(int startPeriod) {
        this.startPeriod = startPeriod;
    }

    public int getEndPeriod() {
        return endPeriod;
    }

    public void setEndPeriod(int endPeriod) {
        this.endPeriod = endPeriod;
    }
}